<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    function Cat(name, color){
        this.name = name;
        this.color = color;
    }

    Cat.isCat = function(arg){
        if(arg){
            return arg.constructor === Cat;
        }
        return false;
    }

    console.dir(Cat);

    console.group("a");
    var Tom = new Cat("Tom", "black");
    // console.log(Tom);
    console.log(Tom.constructor === Cat);
    console.groupEnd("a");


    console.group("b");
    var Kitty = new Cat("Kitty", "pink");
    // console.log(Kitty);
    console.log(Kitty.constructor === Cat);
    console.groupEnd("b");
</script>
</html>